//
//
//
//
//  Created by wulanzhou on 16-3-7.
//  Copyright (c) 2016年 . All rights reserved.
//

#import <Foundation/Foundation.h>
#import "WBRequestObj.h"

@interface WBServiceManager : NSObject<CZRequestObjDelegate>

+ (WBServiceManager *)shareInstance;

/**
 *  request(无参请求,默认请求方式为post)
 *
 *  @param methodName       请求方法名
 *  @param completed        请求完成的block
 *
 */
- (void)requestServiceWithMethodName:(NSString*)methodName completed:(void(^)(WBResponse *response))finished;

/**
 *  request(有参请求,默认请求方式为post)
 *
 *  @param methodName       请求方法名
 *  @param parameters       请求参数
 *  @param completed        请求完成的block
 *
 */
- (void)requestServiceWithMethodName:(NSString*)methodName parameters:(NSDictionary *)params completed:(void(^)(WBResponse *response))finished;


/**
 *  request请求
 *
 *  @param args             请求参数对象
 *  @param completed        请求完成的block
 *
 */
- (void)requestServiceWithArgs:(WBRequestArgs*)args completed:(void(^)(WBResponse *response))finished;

/**
 *  request请求停止
 *
 *  @param requestName  停止请求名称(等于CZRequestArgs.requestKey)
 *
 */
- (void)stopRequestWithName:(NSString*)requestName;
@end
